<!DOCTYPE html>
<html lang="en">
  <head>
    <title>AlertViewController Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Class/AlertViewController" class="dashAnchor"></a>
    <a title="AlertViewController Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Presentr Docs</a> (38% documented)</p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Presentr Reference</a>
        <img id="carat" src="../img/carat.png" />
        AlertViewController Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/AlertAction.html">AlertAction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/AlertViewController.html">AlertViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Presentr.html">Presentr</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/AlertActionStyle.html">AlertActionStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/ModalCenterPosition.html">ModalCenterPosition</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/ModalSize.html">ModalSize</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/PresentationType.html">PresentationType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/TransitionType.html">TransitionType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions.html#/s:C8Presentr18PresentrController">PresentrController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIViewController.html">UIViewController</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Functions.html#/s:ZF8Presentroi2eeFTOS_16PresentationTypeS0__Sb">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:ZF8Presentroi2eeFTOS_9ModalSizeS0__Sb">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:ZF8Presentroi2eeFTOS_19ModalCenterPositionS0__Sb">==(_:_:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Typealiases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:8Presentr16FrameTransformer">FrameTransformer</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>AlertViewController</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">AlertViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>

                </div>
              </div>
            <p>UIViewController subclass that displays the alert</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC8Presentr19AlertViewController9titleTextGSqSS_"></a>
                    <a name="//apple_ref/swift/Property/titleText" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC8Presentr19AlertViewController9titleTextGSqSS_">titleText</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Text that will be used as the title for the alert</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">titleText</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC8Presentr19AlertViewController8bodyTextGSqSS_"></a>
                    <a name="//apple_ref/swift/Property/bodyText" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC8Presentr19AlertViewController8bodyTextGSqSS_">bodyText</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Text that will be used as the body for the alert</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">bodyText</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC8Presentr19AlertViewController11autoDismissSb"></a>
                    <a name="//apple_ref/swift/Property/autoDismiss" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC8Presentr19AlertViewController11autoDismissSb">autoDismiss</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>If set to false, alert wont auto-dismiss the controller when an action is clicked. Dismissal will be up to the action&rsquo;s handler. Default is true.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">autoDismiss</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC8Presentr19AlertViewController15dismissAnimatedSb"></a>
                    <a name="//apple_ref/swift/Property/dismissAnimated" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC8Presentr19AlertViewController15dismissAnimatedSb">dismissAnimated</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>If autoDismiss is set to true, then set this property if you want the dismissal to be animated. Default is true.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">dismissAnimated</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC8Presentr19AlertViewController11viewDidLoadFT_T_"></a>
                    <a name="//apple_ref/swift/Method/viewDidLoad()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC8Presentr19AlertViewController11viewDidLoadFT_T_">viewDidLoad()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">AlertViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC8Presentr19AlertViewController23didReceiveMemoryWarningFT_T_"></a>
                    <a name="//apple_ref/swift/Method/didReceiveMemoryWarning()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC8Presentr19AlertViewController23didReceiveMemoryWarningFT_T_">didReceiveMemoryWarning()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">AlertViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC8Presentr19AlertViewController21updateViewConstraintsFT_T_"></a>
                    <a name="//apple_ref/swift/Method/updateViewConstraints()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC8Presentr19AlertViewController21updateViewConstraintsFT_T_">updateViewConstraints()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">AlertViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/AlertAction&#39;s"></a>
                <a name="//apple_ref/swift/Section/AlertAction&#39;s" class="dashAnchor"></a>
                <a href="#/AlertAction&#39;s">
                  <h3 class="section-name">AlertAction&#39;s</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC8Presentr19AlertViewController9addActionFCS_11AlertActionT_"></a>
                    <a name="//apple_ref/swift/Method/addAction(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC8Presentr19AlertViewController9addActionFCS_11AlertActionT_">addAction(_:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Adds an &lsquo;AlertAction&rsquo; to the alert controller. There can be maximum 2 actions. Any more will be ignored. The order is important.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">addAction</span><span class="p">(</span><span class="nv">action</span><span class="p">:</span> <span class="kt">AlertAction</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>action</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The &lsquo;AlertAction&rsquo; to be added</p>

                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2016 <a class="link" href="http://github.com/icalialabs/Presentr" target="_blank" rel="external">Daniel Lozano</a>. All rights reserved. (Last updated: 2016-07-06)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.6.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
